package com.ebao.po.doctor;

import java.io.Serializable;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;
import javax.persistence.Table;

/**
 * @desc 大夫挂号设置
 * @author snow
 * @date 2012-6-28
 */
@Entity
@Table(name = "T_Register_Set")
public class TRegisterSet implements Serializable {

	private static final long serialVersionUID = -7115212717794928159L;

	private Integer id;
	private TDoctor doctor;		// 大夫
	private float fee;			// 挂号费
	private Integer amount;		// 每日最高挂号数

	@Id
	@GeneratedValue
	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@OneToOne(cascade = {CascadeType.REMOVE}, optional = false, targetEntity = TDoctor.class)
	@JoinColumn(name = "doctor_id")
	public TDoctor getDoctor() {
		return doctor;
	}

	public void setDoctor(TDoctor doctor) {
		this.doctor = doctor;
	}

	public float getFee() {
		return fee;
	}

	public void setFee(float fee) {
		this.fee = fee;
	}
	
	@Column(length = 3)
	public Integer getAmount() {
		return amount;
	}

	public void setAmount(Integer amount) {
		this.amount = amount;
	}

}
